<?php
/**
 * Created by PhpStorm.
 * User: xshaitt
 * Date: 2016/8/5
 * Time: 16:22
 */
namespace Home\Model;
use Think\Model\RelationModel;
class DynamicModel extends RelationModel{
    protected $_link = array(
        'Comment' => array(
            'mapping_type'  => self::HAS_MANY,
            'class_name'    => 'dynamic_comment',
            'foreign_key'   => 'did',
            'mapping_name'  => 'comments',
        ),
    );
}